home *** CD-ROM | disk | FTP | other *** search
- import AtomicClock.c;
- import java.io.InputStream;
- import javax.microedition.io.Connector;
- import javax.microedition.io.StreamConnection;
-
- class AtomicClock$a extends Thread {
- // $FF: renamed from: if javax.microedition.io.StreamConnection
- private StreamConnection field_0;
- // $FF: renamed from: try java.io.InputStream
- private InputStream field_1;
- // $FF: renamed from: for java.lang.StringBuffer
- private StringBuffer field_2;
- // $FF: renamed from: case boolean
- private boolean field_3;
- // $FF: renamed from: int boolean
- private boolean field_4;
- // $FF: renamed from: a int
- private int field_5;
- // $FF: renamed from: new int
- private int field_6;
- // $FF: renamed from: do java.lang.String
- private String field_7;
- // $FF: renamed from: byte boolean
- private boolean field_8;
- // $FF: synthetic field
- private final AtomicClock this$0;
-
- AtomicClock$a(AtomicClock var1) {
- this.this$0 = var1;
- this.field_0 = null;
- this.field_1 = null;
- this.field_2 = new StringBuffer();
- this.field_3 = true;
- this.field_4 = false;
- this.field_8 = false;
- }
-
- public synchronized void run() {
- while(this.field_3) {
- try {
- this.wait();
- } catch (Exception var2) {
- this.this$0.a("Problem in Connect wait\n" + var2);
- }
-
- if (this.field_3) {
- this.method_0();
- }
- }
-
- }
-
- // $FF: renamed from: do () void
- private void method_0() {
- try {
- this.field_0 = (StreamConnection)Connector.open("http://www.zeroindex.co.uk/apps/clock/clock.php");
- this.field_1 = this.field_0.openInputStream();
- this.field_6 = 0;
- AtomicClock.access$1200().setText("Downloading");
-
- while((this.field_5 = this.field_1.read()) != -1) {
- this.field_2.append((char)this.field_5);
- ++this.field_6;
- }
-
- this.field_1.close();
- this.field_0.close();
- } catch (Exception var3) {
- this.this$0.a("Connection interrupted");
- this.field_4 = true;
- }
-
- if (!this.field_4) {
- this.field_7 = this.field_2.toString();
- this.field_2 = new StringBuffer();
-
- try {
- AtomicClock.access$602(this.field_7);
- AtomicClock.access$702(Integer.parseInt(AtomicClock.access$600().substring(0, 2)));
- AtomicClock.access$902(Integer.parseInt(AtomicClock.access$600().substring(3, 5)));
- AtomicClock.access$1002(Integer.parseInt(AtomicClock.access$600().substring(6, 8)));
- AtomicClock.access$702((AtomicClock.access$1300(this.this$0) + AtomicClock.access$700()) % 24);
- AtomicClock.access$702(AtomicClock.access$700() < 0 ? 24 + AtomicClock.access$700() : AtomicClock.access$700());
- this.field_7 = "";
- c.access$1500(AtomicClock.access$1400(this.this$0));
- } catch (Exception var2) {
- this.field_4 = true;
- }
- }
-
- if (this.field_4) {
- AtomicClock.access$1200().setText("Failed to connect!");
- this.field_4 = false;
- this.field_2 = new StringBuffer();
- this.field_0 = null;
- this.field_1 = null;
- }
-
- AtomicClock.access$1700(this.this$0).addCommand(AtomicClock.access$1600(this.this$0));
- AtomicClock.access$1800(this.this$0).a();
- this.field_8 = false;
- }
-
- // $FF: renamed from: for () void
- private synchronized void method_1() {
- this.field_8 = true;
-
- try {
- this.notify();
- } catch (Exception var2) {
- this.this$0.a("Application error 4");
- }
-
- }
-
- // $FF: renamed from: if () void
- private void method_2() {
- this.field_8 = false;
- this.field_2 = new StringBuffer();
- this.field_0 = null;
- this.field_1 = null;
- }
-
- // $FF: renamed from: a () void
- private void method_3() {
- this.field_8 = false;
- this.field_3 = false;
- this.field_2 = null;
- this.field_0 = null;
- this.field_1 = null;
- }
-
- // $FF: synthetic method
- static void access$000(AtomicClock$a var0) {
- var0.method_3();
- }
-
- // $FF: synthetic method
- static void access$200(AtomicClock$a var0) {
- var0.method_1();
- }
-
- // $FF: synthetic method
- static boolean access$300(AtomicClock$a var0) {
- return var0.field_8;
- }
-
- // $FF: synthetic method
- static void access$400(AtomicClock$a var0) {
- var0.method_2();
- }
- }
-